<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page import="cn.com.darly.vpm.root.ApplicationVPM" %>
<c:set var="root" value="${pageContext.request.contextPath}"/>

<html>
<head>
    <!--標題欄圖標-->
    <link rel="SHORTCUT ICON" href="${root}/images/logo.ico"/>
    <title><%=ApplicationVPM.getApplicationName()%></title>
    <link href="${root}/vpm/css/vpmindex.css" rel="stylesheet" type="text/css"  media="all"/>
</head>
<body>
<div style="text-align: right;size: 10px;color: white" id="closer">
    页面关闭剩余<%=ApplicationVPM.getLiveTime()%>秒
</div>
<h2 align="center"><span style="color: white"> 恭喜恭喜<%=ApplicationVPM.getApplicationName()%>正常启动，欢迎使用！</span></h2>
<script type="text/javascript">
    var time = <%=ApplicationVPM.getLiveTime()%>;
    var clore = document.getElementById("closer");
    window.onload = function () {
        var interval = setInterval(
            function () {
                time --;
                clore.innerHTML = "页面关闭剩余"+time+"秒";
                if (time<=0){
                    clearInterval(interval);
                    window.opener  = null;
                    window.parent.close();
                }
            },1000)
    }
</script>
</body>
</html>